package com.mf.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import io.github.heollhai.common.entity.bo.UserBo;
import io.github.heollhai.common.entity.vo.user.UserVo;
import com.mf.entity.request.UserRequest;
import com.mf.entity.request.serach.UserSearchRequest;
import org.springframework.security.core.userdetails.UserDetails;

/**
* 用户表 服务类
*
* @author mf
* @since 2024-08-06
*/
    public interface IUserService extends IService<UserBo> {
    UserBo findByAccount(String account);

    /**
     * 根据账号查询用户信息
     */
    UserDetails loadUserByUsername(String username);
    /**
     * 注册
     */
    Integer register(UserBo userBo);
    /**
     * 分页查询
     */
    Page<UserVo> pageList(UserSearchRequest userSearchRequest);

    /**
     * 分页查询用户和对应角色
     */
    Page<UserVo> pageListUserAndRole(UserSearchRequest userSearchRequest);
}
